package com.itbaizhan.pojo;

import java.util.ArrayList;
import java.util.List;

public class Orders {
    private int orderid;
    private double orderprice;
    //不用user_id ,因为user_idj是users表关联对象

    //关联Users,一个订单只可以关一个用户
    //这里不是集合，是对象，所以不可以new
    //这是以Orders表的user_id为引，查询Users表里的信息，所以这里定义
    //Users属性更合适
    private  Users users;
    //关联Items 一个订单有多个商品
    private List<Items> items = new ArrayList<>();

    public int getOrderid() {
        return orderid;
    }

    public void setOrderid(int orderid) {
        this.orderid = orderid;
    }

    public double getOrderprice() {
        return orderprice;
    }

    public void setOrderprice(double orderprice) {
        this.orderprice = orderprice;
    }

    public Users getUsers() {
        return users;
    }

    public void setUsers(Users users) {
        this.users = users;
    }

    public List<Items> getItems() {
        return items;
    }

    public void setItems(List<Items> items) {
        this.items = items;
    }
}
